﻿using System;
using Kiva7.Utilities;
using Kiva7.DataResponse;
using Kiva7.DataClasses;

namespace Kiva7.DataRequests
{
    public class TeamDetailRequest : DataRequest<TeamsResponse, Team>
    {
        public TeamDetailRequest()
            : base(true, true)
        {
        }

        public Uri BuildUri(int teamId)
        {
            UrlCreator url = new UrlCreator(string.Format(BaseUrl + "teams/{0}.xml", teamId));

            url.Add("app_id", KivaAppId);

            return url.ToUri();
        }

        public void GetTeam(int teamId)
        {
            LoadResponse(BuildUri(teamId));
        }

    }
}
